from django.conf.urls import url
from . import views
from rest_framework_jwt.views import obtain_jwt_token





urlpatterns = [
    url(r'^sms_codes/(?P<mobile>1[3-9]\d{9})/$', views.SMS_CODEView.as_view()),
    url(r'^usernames/(?P<username>\w+)/count/$', views.UserNameView.as_view()),
    url(r'^mobiles/(?P<mobile>\d+)/count/$', views.MobileView.as_view()),
    url(r'^users/$', views.UsersView.as_view()),
    # url(r'^authorizations/$', obtain_jwt_token),
    url(r'^authorizations/$', views.UserLoginView.as_view()),
    url(r'^user/$', views.UserDetailView.as_view()),
    url(r'^email/$', views.UserUpdateView.as_view()),
    url(r'^emails/verification/$', views.EmailVerify.as_view()),
    # url(r'^users/(?P00<pk>\d+)/password/$', views.UpdatePasswordView.as_view()),
    url(r'^image_codes/(\S+)/$', views.ImageCode.as_view()),
    url(r'^accounts/(?P<username>\w+)/sms/token/$', views.UsernameCode.as_view()),
    url(r'^sms_codes/$', views.FindPassword_SendSMSCODE.as_view()),
    url(r'^accounts/(?P<username>\w+)/password/token/$', views.FindPassword_SMSCODE.as_view()),
    url(r'^users/(?P<user_id>\d+)/password/$', views.FindPassword_NewPassword.as_view()),

]
